package com.kyxx.topics.widget;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.Window;
import android.view.WindowManager;

import com.kyxx.topics.R;


public class LoadingDialog extends Dialog {
    private LayoutInflater factory;
    private Context context;

    public LoadingDialog(Context context, int theme) {
        super(context, theme);
        this.context = context;
        factory = LayoutInflater.from(context);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.setContentView(factory.inflate(R.layout.layout_dialog_loading,
                null));
        Window window = this.getWindow();
        window.setGravity(Gravity.CENTER);
        setCanceledOnTouchOutside(false);
        setCancelable(false);
    }
}
